-- GENERATED SPELL FOR [Cabal Spell-weaver] --


function spell0_21902(pUnit, Event) --@Drain Life,Drain--
pUnit:FullCastSpellOnTarget(17173,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_21902', 5000, 1)
end

function spell1_21902(pUnit, Event) --@Incinerate,n/a--
pUnit:FullCastSpellOnTarget(32707,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21902', 2500, 1)
end

function Sorts_21902(pUnit, Event)
local choix_sorts_21902 = math.random(0, 1)
if choix_sorts_21902 == 0 then
pUnit:RegisterEvent('spell0_21902', 1, 1)
end
if choix_sorts_21902 == 1 then
pUnit:RegisterEvent('spell1_21902', 1, 1)
end
end

function mob21902_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21902', math.random(1500, 3000), 1)
end

function mob21902_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21902_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21902_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21902, 1, 'mob21902_Action')
RegisterUnitEvent(21902, 2, 'mob21902_Leave')
RegisterUnitEvent(21902, 3, 'mob21902_Kill')
RegisterUnitEvent(21902, 4, 'mob21902_Die')
